
/**
 * 加载部门信息
 * @param {} value
 */
function loadChilds(value, superCMPId) {
	if(superCMPId == 'professionalName') {
		clear("gradeName");
		clear("className");
	}
		if(value == -1) {
			var superCMP = document.getElementById(superCMPId);
			for(var i=superCMP.options.length-1;i>=0;i--) 
        		superCMP.options.remove(i); 
			return;
		}
		Ext.Ajax.timeout = 60000;
		Ext.Ajax.request({
					url : 'common/getSchoolProperties.action',
					method : "post",
					params : {
						superId : value
					},
					timeout : 20000,
					success : function(response) {
						var json = eval("(" + response.responseText + ")");
						var superCMP = document.getElementById(superCMPId);
						if (json.sps != null) {
							//将数据填充到系别列表中
							for(var   i=superCMP.options.length-1;i>=0;i--) 
        						superCMP.options.remove(i); 
							var rootOption=document.createElement("option");
							rootOption.value="0";
							rootOption.text="请选择";
							superCMP.add(rootOption);
							for(var i = 0;i<json.sps.length;i++) {
								var sp = json.sps[i];
								var objOption=document.createElement("option");
							   objOption.value=sp.id;
							   objOption.text=sp.name;
							   superCMP.add(objOption);
							}
							return;
						} else {
							Ext.Msg.alert("提示", "执行失败，内部服务器错误！");
						}
					},
					failure : function(response) {
						Ext.Msg.alert("提示", "请求失败，请稍后重试！");
					}
				});
}
function clear(domId) {
	var superCMP = document.getElementById(domId);
			for(var i=superCMP.options.length-1;i>=0;i--) 
        		superCMP.options.remove(i);
}